home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / FILER / GZIP1_2_.SPK / src_zip_gz / src / zip / other / Makefile.i < prev    next >
Makefile  |  1993-06-24  |  11KB  |  353 lines

  1. # Makefile for gzip (GNU zip)    -*- Indented-Text -*-
  2. # Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # $Id: Makefile.in,v 0.22 1993/06/16 17:24:19 jloup Exp $
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22.  
  23. srcdir = @srcdir@
  24. VPATH = @srcdir@
  25.  
  26. CC = @CC@
  27. ASCPP = @ASCPP@
  28.  
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32.  
  33. # Things you might add to DEFS (configure usually figures out what to do):
  34. # -DGNU_STANDARD        Behave as gzip even if invoked as gunzip (GNU standard)
  35. # -DDIRENT              Use <dirent.h>  for recursion (-r)
  36. # -DSYSDIR              Use <sys/dir.h> for recursion (-r)
  37. # -DSYSNDIR             Use <sys/ndir.h> for recursion (-r)
  38. # -DNDIR                Use <ndir.h> for recursion (-r)
  39. # -DSTDC_HEADERS        Use <stdlib.h>
  40. # -DHAVE_UNISTD_H    Use <unistd.h>
  41. # -DNO_FCNTL_H          Don't use <fcntl.h>
  42. # -DNO_UTIME_H        Don't use <utime.h>
  43. # -DHAVE_SYSUTIME_H    Use <sys/utime.h>
  44. # -DNO_MEMORY_H         Don't use <memory.h>. Not needed if STDC_HEADERS.
  45. # -DNO_STRING_H         Use strings.h, not string.h. Not needed if STDC_HEADERS
  46. # -DRETSIGTYPE=int      Define this if signal handlers must return an int.
  47. # -DNO_SYMLINK          OS defines S_IFLNK but does not support symbolic links
  48. # -DNO_MULTIPLE_DOTS    System does not allow file names with multiple dots
  49. # -DNO_UTIME        System does not support setting file modification time
  50. # -DNO_CHOWN        System does not support setting file owner
  51. # -DNO_DIR        System does not support readdir()
  52. # -DPROTO        Force function prototypes even if __STDC__ not defined
  53. # -DASMV        Use asm version match.S
  54. # -DMSDOS        MSDOS specific
  55. # -DOS2            OS/2 specific
  56. # -DVAXC        Vax/VMS with Vax C compiler
  57. # -DVMS            Vax/VMS with gcc
  58. # -DDEBUG        Debug code
  59. # -DDYN_ALLOC        Use dynamic allocation of large data structures
  60. # -DMAXSEG_64K        Maximum array size is 64K (for 16 bit system)
  61. # -DRECORD_IO           read() and write() are rounded to record sizes.
  62. # -DNO_STDIN_FSTAT      fstat() is not available on stdin
  63. # -DNO_FSTAT            fstat() is not available
  64. # -DNO_SIZE_CHECK       stat() does not give a reliable file size
  65.  
  66. DEFS = @DEFS@
  67. LIBS = @LIBS@
  68.  
  69. # additional assembly sources for particular systems may be required.
  70. OBJA = @OBJA@
  71.  
  72. SEDCMD = @SEDCMD@
  73.  
  74. CFLAGS = @CFLAGS@
  75. # If you want debug on by default, use: CFLAGS="-g" ./configure
  76. LDFLAGS = $(CFLAGS)
  77.  
  78. X=
  79. # For OS/2 or MSDOS, use: X=.exe
  80.  
  81. O=.o
  82. # For OS/2 or MSDOS, use: O=.obj
  83.  
  84. ZCAT=zcat
  85. # To install zcat executable and man page as gzcat, use: ZCAT=gzcat
  86.  
  87. prefix = /usr/local
  88. exec_prefix = $(prefix)
  89.  
  90. bindir = $(exec_prefix)/bin
  91. scriptdir = $(bindir)
  92. # scriptdir is the directory in which shell scripts should be installed
  93. datadir = $(prefix)/lib
  94. libdir = $(prefix)/lib
  95. infodir = $(prefix)/info
  96.  
  97. # Extension (not including `.') for the installed manual page filenames.
  98. manext = 1
  99. # Where to install the manual pages.
  100. mandir = $(prefix)/man/man$(manext)
  101.  
  102. alldirs = $(bindir) $(scriptdir) $(datadir) $(libdir) $(infodir) $(mandir)
  103.  
  104. #### End of system configuration section. ####
  105.  
  106. SHELL = /bin/sh
  107.  
  108. LOADLIBES = $(LIBS)
  109.  
  110. TAR = tar
  111.  
  112. SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
  113.        lzw.c unlzw.c unpack.c unlzh.c getopt.c match.S
  114.  
  115. OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
  116.        crypt$O lzw$O unlzw$O unpack$O unlzh$O getopt$O $(OBJA)
  117.  
  118. HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
  119.  
  120. GENFILES =  README NEWS INSTALL Makefile.in configure.in configure COPYING \
  121.   TODO THANKS ChangeLog $(SRCS) $(HDRS) zmore.in znew.in zdiff.in zgrep.in \
  122.   zforce.in gzexe.in gzip.1 zdiff.1 zgrep.1 zmore.1 znew.1 gzexe.1 zforce.1 \
  123.   gzip.doc algorithm.doc gzip.texi texinfo.tex gpl.texinfo gzip.info
  124.  
  125. sampleFILES =  sample/makecrc.c sample/zread.c sample/add.c sample/sub.c \
  126.        sample/ztouch sample/zfile
  127.  
  128. msdosFILES = msdos/tailor.c msdos/match.asm msdos/gzip.prj msdos/doturboc.bat \
  129.   msdos/Makefile.msc msdos/Makefile.bor msdos/Makefile.djg
  130.  
  131. os2FILES = os2/Makefile.os2 os2/gzip.def os2/gzip16.def
  132.  
  133. vmsFILES = vms/Readme.vms vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com \
  134.    vms/Makefile.mms vms/vms.c vms/gzip.hlp
  135.  
  136. amigaFILES = amiga/Makefile.sasc amiga/Makefile.gcc amiga/tailor.c \
  137.   amiga/utime.h amiga/match.a
  138.  
  139. atariFILES = atari/Makefile.st
  140.  
  141. primosFILES = primos/readme primos/primos.c primos/ci.opts \
  142.    primos/build.cpl primos/include/errno.h primos/include/fcntl.h \
  143.    primos/include/stdlib.h primos/include/sysStat.h primos/include/sysTypes.h
  144.  
  145. DISTFILES = $(GENFILES) $(sampleFILES) $(msdosFILES) $(os2FILES) $(vmsFILES)\
  146.    $(amigaFILES) $(atariFILES) $(primosFILES)
  147.  
  148. .c$O:
  149.     $(CC) -c $(DEFS) $(CFLAGS) $<
  150.  
  151. #.PHONY: default all force test check
  152.  
  153. default:  gzip$X
  154. all:    gzip$X zdiff zgrep zmore znew zforce gzexe
  155. force:
  156.  
  157. #### Start of specific targets section. ####
  158. #
  159. # 'configure' works only on Unix systems. For other systems able to make
  160. # sense of this makefile, you can define target specific entries here.
  161. # For other systems such as MSDOS, separate Makefiles are
  162. # provided in subdirectories.
  163.  
  164. # gcc with emx 0.8f kit (use by preference os2/Makefile.os2)
  165. os2_gcc:
  166.     $(MAKE) all CC=gcc CFLAGS="-O -DOS2" X=".exe"
  167.  
  168. # Xenix 2.3.2 for 286:
  169. xenix_286:
  170.     $(MAKE) all CFLAGS="-LARGE -M2l"
  171.  
  172. # Coherent (with broken /bin/sh):
  173. coherent:
  174.     $(MAKE) all OBJA=match.o DEFS=\
  175.     "-DASMV -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1"
  176.  
  177. #### End of specific targets section. ####
  178.  
  179. install: installdirs installbin installman
  180.  
  181. installbin: all
  182.     $(INSTALL_PROGRAM) gzip$X $(bindir)/gzip$X
  183.     for f in zdiff zgrep zmore znew zforce gzexe; do \
  184.       $(INSTALL_PROGRAM) $${f} $(scriptdir)/$${f}; done
  185.     rm -f $(scriptdir)/zcmp; ln $(scriptdir)/zdiff $(scriptdir)/zcmp
  186.     for f in gunzip$X ungzip$X $(ZCAT)$X ; do \
  187.       rm -f $(bindir)/$${f}; done
  188.     @if echo $(DEFS) | grep GNU_STANDARD > /dev/null; then \
  189.       echo 'exec gzip -d  $${1+"$$@"}' > $(bindir)/gunzip$X; \
  190.       echo 'exec gzip -dc $${1+"$$@"}' > $(bindir)/$(ZCAT)$X; \
  191.       chmod 755 $(bindir)/gunzip$X  $(bindir)/$(ZCAT)$X; \
  192.     else \
  193.       ln $(bindir)/gzip$X $(bindir)/gunzip$X; \
  194.       ln $(bindir)/gzip$X $(bindir)/$(ZCAT)$X; \
  195.     fi
  196.  
  197. installman: gzip.info
  198.     for f in gzip gunzip $(ZCAT) zcmp zdiff zgrep zmore znew zforce gzexe; do \
  199.       rm -f $(mandir)/$${f}.$(manext); done
  200.     -cd $(srcdir); \
  201.       for f in gzip zdiff zgrep zmore znew zforce gzexe; do \
  202.       $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
  203.     echo .so man$(manext)/gzip.$(manext) > $(mandir)/$(ZCAT).$(manext)
  204.     echo .so man$(manext)/gzip.$(manext) > $(mandir)/gunzip.$(manext)
  205.     echo .so man$(manext)/zdiff.$(manext) > $(mandir)/zcmp.$(manext)
  206.     -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
  207.       $(infodir)/$${f}; done
  208.  
  209. uninstall: force
  210.     -cd $(bindir); rm -f gzip$X gunzip$X $(ZCAT)$X
  211.     -cd $(scriptdir); rm -f zcmp zdiff zgrep zmore znew zforce gzexe
  212.     -for f in gzip gunzip $(ZCAT) zcmp zdiff zgrep zmore znew gzexe; do \
  213.       rm -f $(mandir)/$${f}.$(manext); done
  214.     -cd $(infodir); rm -f gzip.info*
  215.  
  216. # install all files and replace compress (not recommended)
  217. install_compress: install
  218.     -test -f $(bindir)/compress.old || \
  219.       mv $(bindir)/compress$X $(bindir)/compress.old
  220.     ln $(bindir)/gzip$X $(bindir)/compress$X
  221.     rm -f $(bindir)/uncompress$X
  222.     ln $(bindir)/gzip$X $(bindir)/uncompress$X
  223.  
  224. # Make sure all installation directories, e.g. $(bindir) actually exist by
  225. # making them if necessary. At most one level is created (except for man).
  226. installdirs:
  227.     -if test ! -d $(prefix)/man; then \
  228.        mkdir $(prefix)/man; fi
  229.     -for dir in $(alldirs) ; do \
  230.        if test ! -d $${dir}; then \
  231.          mkdir $${dir}; fi; \
  232.     done
  233.  
  234. test: check
  235. check:    gzip$X
  236.     ./gzip -6 < $(srcdir)/texinfo.tex > _gztest.gz
  237.     @LANG=""; export LANG; if test `wc -c < _gztest.gz` -eq 30890; then \
  238.        true; \
  239.     else \
  240.        echo FAILED gzip test: incorrect size; \
  241.     fi
  242.     rm -f _gztest
  243.     ./gzip -d _gztest.gz
  244.     @if cmp _gztest $(srcdir)/texinfo.tex; then \
  245.        echo gzip test OK; \
  246.     else \
  247.        echo FAILED gzip test: incorrect decompress; \
  248.     fi
  249.     rm -f _gztest*
  250.  
  251. TAGS: $(SRCS) $(HDRS)
  252.     cd $(srcdir); etags $(SRCS) $(HDRS)
  253.  
  254. Makefile: Makefile.in ./config.status
  255.     ./config.status
  256.  
  257. ./config.status: configure
  258.     $(srcdir)/configure --srcdir=$(srcdir) --no-create
  259.  
  260. configure: configure.in
  261.     @echo Warning: configure is out of date
  262. #    cd $(srcdir); autoconf
  263.  
  264. clean:
  265.     rm -f *$O gzip$X gunzip$X ungzip$X $(ZCAT)$X add$X sub$X a.out core
  266.     rm -f zcmp zdiff zgrep zmore znew zforce gzexe _gztest*
  267.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  268.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  269.  
  270. mostlyclean: clean
  271.  
  272. distclean: clean
  273.     rm -f Makefile config.status
  274.  
  275. realclean: distclean
  276.     rm -f TAGS gzip.info* gzip.doc
  277.  
  278. dist: $(DISTFILES) Makefile
  279.     d=gzip-`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  280.                 -e q revision.h` ; \
  281.     rm -f ../$$d; \
  282.     ln -s `pwd` ../$$d; \
  283.     cd ..; \
  284.     files=""; \
  285.     for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
  286.     GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
  287.     rm -f $$d
  288.  
  289. zipdist: $(DISTFILES) Makefile
  290.     zip -u9T gzip`sed -e '/VERSION/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  291.               -e s/[.]//g -e q revision.h` $(DISTFILES)
  292.  
  293. # Actual build-related targets
  294.  
  295. gzip$X:    Makefile $(OBJS)
  296.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  297.     rm -f gunzip$X $(ZCAT)$X
  298.     ln gzip$X gunzip$X
  299.     ln gzip$X $(ZCAT)$X
  300.  
  301. gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
  302. util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
  303.  
  304. gzip$O unlzw$O: revision.h lzw.h
  305.  
  306. bits$O unzip$O util$O zip$O: crypt.h
  307.  
  308. gzip$O getopt$O: getopt.h
  309.  
  310. match$O: match.S
  311.     $(ASCPP) $(srcdir)/match.S > _match.s
  312.     $(CC) -c _match.s
  313.     mv _match$O match$O
  314.     rm -f _match.s
  315.  
  316. zdiff: zdiff.in
  317.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zdiff.in > zdiff
  318.     chmod 755 zdiff
  319.  
  320. zgrep: zgrep.in
  321.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zgrep.in > zgrep
  322.     chmod 755 zgrep
  323.  
  324. zmore: zmore.in
  325.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zmore.in > zmore
  326.     chmod 755 zmore
  327.  
  328. znew: znew.in
  329.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/znew.in > znew
  330.     chmod 755 znew
  331.  
  332. zforce: zforce.in
  333.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/zforce.in >zforce
  334.     chmod 755 zforce
  335.  
  336. gzexe: gzexe.in
  337.     sed -e "$(SEDCMD)" -e "s|BINDIR|$(bindir)|" $(srcdir)/gzexe.in > gzexe
  338.     chmod 755 gzexe
  339.  
  340. gzip.info: gzip.texi
  341.     cd $(srcdir); makeinfo gzip.texi
  342.  
  343. gzip.dvi: gzip.texi
  344.     cd $(srcdir); texi2dvi gzip.texi
  345.  
  346. gzip.doc: gzip.1
  347.     nroff -man $(srcdir)/gzip.1 | col -b | uniq > gzip.doc
  348.  
  349. # Prevent GNU make v3 from overflowing arg limit on SysV.
  350. .NOEXPORT:
  351.  
  352. # end of file
  353.